<?php include dirname(__FILE__).'/common/header.php'; ?>

<?php include dirname(__FILE__).'/common/menu.php'; ?>

var attr = {};
attr.ctrlName = '<?php echo $ctrlName; ?>';
/*
| -------------------------------------------------------------------
|  List Grid
| -------------------------------------------------------------------
*/
list.grid = new ZM.GridPanel({
    url: list.baseUrl + attr.ctrlName+'/getLotteryHistoryList',
    columns:[
        {header:'顾客ID',dataIndex:'customer_id',filter:{}},
        {header:'顾客姓名',dataIndex:'nickname',filter:{}},
        {header:'红包金额',dataIndex:'gift_money',sort:true,filter:{xtype:'combofield',options:[['','全部'],['0','无'],['1','获得红包']]}},
        {header:'城市',dataIndex:'city_name',filter:{}},
        {header:'所需点击次数',dataIndex:'city_click_limit',renderer:function(val) {
        	return '<span style="color:#aaa">'+val+'</span>';
        }},
        {header:'顾客点击次数',dataIndex:'history_click_time',renderer:function(val,m,r) {
			return parseInt(val) >= parseInt(r.json.city_click_limit) ? '<span style="color:green">'+val+'</span>' : '<span style="color:red">'+val+'</span>';
        }},
        {header:'游戏开始时间',dataIndex:'lottery_time_time_create',width:140},
        {header:'游戏结束时间',dataIndex:'history_time_submit',width:140}
    ]
});
/*
| -------------------------------------------------------------------
|  List Grid Action
| -------------------------------------------------------------------
*/


<?php include dirname(__FILE__).'/common/layout.php'; ?>
list.grid.store.load();
<?php include dirname(__FILE__).'/common/footer.php'; ?>